package scau.jump.rfid.driver.console;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

import scau.jump.rfid.driver.Driver;
import scau.jump.rfid.driver.Reader;
import scau.jump.rfid.driver.Writer;

public class ConsoleDriver implements Driver {
	
	public static String file = "E:\\rfid.tmp";
	
	static {
		Properties conf = new Properties();
		InputStream in  = ConsoleDriver.class.getClassLoader().getResourceAsStream("conf.properties");
		try {
			conf.load(in);
			file = conf.getProperty("file");
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			if(in != null)
				try {
					in.close();
				} catch (IOException e) {
				}
		}
	}

	public Reader getReader() {
		return new ConsoleReader();
	}

	public Writer getWriter() {
		return new ConsoleWriter();
	}

}
